<!--
 * @description  : 任务详情
 * @descriptionDetail: 任务详情
 * @copyright    : 浙江烟草
 * @author       : lt
 * @create       : 2022-09-27 09:58:58
-->

<template>
  <view>
    <!-- #ifdef H5-ONLY -->
    <theme-navbar
      :is-white="false"
      :title="navTitle"
      :custom-back="goBack"
      style="z-index: 99999"
    > 
    </theme-navbar>
    <!-- #endif -->
    <u-card
      margin="20rpx"
      :show-head="false"
      :show-foot="false"
      thumb="../../../../static/check/pending-approval.png"
      thumb-width="38"
      box-shadow="#e5e5e5 0px 0px 50px"
    >
      <template #body>
        <u-row class="margin-bottom">
          <u-col class="top">
            {{ formData.customerName }}
          </u-col>
        </u-row>
        <u-row class="margin-bottom">
          <u-col class="left" span="4">
            发送人
          </u-col>
          <u-col class="right" span="8">
            {{ formData.sender }}
          </u-col>
        </u-row>
        <u-row class="margin-bottom">
          <u-col span="4" class="left">
            手机号码
          </u-col>
          <u-col span="8" class="right">
            {{ formData.senderPhoneNumber }}
          </u-col>
        </u-row>
        <u-row class="margin-bottom">
          <u-col span="4" class="left">
            发送时间
          </u-col>
          <u-col span="8" class="right">
            {{ formData.sendTime }}
          </u-col>
        </u-row>
        <u-row class="margin-bottom">
          <u-col span="4" class="left">
            发送部门
          </u-col>
          <u-col span="8" class="right">
            {{ formData.sendDepartment }}
          </u-col>
        </u-row>
        <u-row class="margin-bottom">
          <u-col span="4" class="left">
            要求时间
          </u-col>
          <u-col span="8" class="right">
            {{ formData.requestTime }}
          </u-col>
        </u-row>
      </template>
    </u-card>
    <u-card
      margin="20rpx"
      :show-head="false"
      :show-foot="false"
      thumb="../../../../static/check/pending-approval.png"
      thumb-width="38"
      box-shadow="#e5e5e5 0px 0px 50px"
    >
      <template #body>
        <view class="topp2" v-if="!formData.checkAnnalName =='' || !formData.checkAnnalName ==null">
          {{ formData.checkAnnalName }}
        </view>
        <view class="topp2" v-else>
          无名称
        </view>
        <view class="top2">
          异常情况描述
        </view>
        <view class="bottom2">
          {{ formData.surveyHistoryDescription }}
        </view>
        <u-line color="#DDDDDD"></u-line>
        <view class="top2">
          调查对象历史情况描述
        </view>
        <view class="bottom2">
          {{ formData.excDescription }}
        </view>
        <u-line color="#DDDDDD"></u-line>
        <view class="top2">
          调查意见
        </view>
        <view class="bottom2">
          {{ formData.surveyOpinion }}
        </view>
        <u-line color="#DDDDDD"></u-line>
        <view class="top2">
          计划描述
        </view>
        <view class="bottom2">
          {{ formData.taskDescription }}
        </view>
      </template>
    </u-card>
  </view>
</template>
<script>
import MescrollMoreMixin from "@/components/mescroll-uni/mixins/mescroll-more.js";
import fieldAuditService from "@/service/internal/fieldAudit.service.js";
export default {
  components: {},
  mixins: [MescrollMoreMixin,],
  data(){
    return{
      checkAnnalUuid:'',
      formData:{},
    };
  },
  onLoad(obj){
    this.checkAnnalUuid = obj.checkAnnalUuid;
    uni.showLoading({
      title: '加载中..',
      mask: true,
    });
    return new Promise(resolve => {
      fieldAuditService.fieldCheckAnnalDetail(this.checkAnnalUuid).then((res) => {
        if(res.success){
          uni.hideLoading();
          if(res.bean == null){
            this.$u.toast("无数据");
          }
          this.formData = res.bean;
        }else{
          this.$u.toast(res.msg);
        } 
      }).catch((error) => {
        this.$u.toast(error);
      });       
    });
  },
  methods:{
    loadData(page) {
      console.log("page.size", page.size, "page.num", page.num);
      return new Promise(resolve => {
        // TODO 模拟查询到的数据
        setTimeout(() => {
          let list = [];
          // 设置列表数据
          for (let k = 0; k < 10; k ++) {
            list.push({
              name:'xxxxxxxxxx商店', 
              address:'xx市xx区xx路xx号',
              checked: false,           
            });
          }
          resolve({"data": list,});
        }, 1000);
      });
    },
    test(){
      console.log("点击");
    },
    checkedAll(){
      this.checked = true;
      if(this.itemchecked){
        this.checked = false
      }
      console.log("复选框",this.checked);
    },
  },
};
</script>
<style lang="scss" scoped>
.news-li{
		font-size: 32rpx;
		padding: 32rpx;
		border-bottom: 1rpx solid #eee;
	}
	.news-li .new-content{
		font-size: 28rpx;
		margin-top: 10rpx;
		margin-left: 20rpx;
		color: #666;
	}
  .margin-bottom{
    margin-bottom: 24px;    
  }
  .top{
    font-size: 22px;
    font-weight: 600;
    color: rgba(23, 26, 29, 0.8);
    opacity: 1;
    margin-bottom: 24px;
  }
  .left{
    font-size: 17px;
    font-weight: 300;
    line-height: 0px;
    color: #999999;
    opacity: 1;
    margin-bottom: 24px;
  }
  .right{
    font-size: 17px;
    font-weight: 600;
    line-height: 0px;
    color: rgba(23, 26, 29, 0.8);
    opacity: 1;
    margin-bottom: 24px;
  }
  .topp2{
    font-size: 22px;
    font-weight: 600;
    color: rgba(23, 26, 29, 0.8);
    opacity: 1;
  }
  .top2{
    font-size: 16px;
    font-weight: 600;
    color: #171A1D;
    opacity: 1;
    margin-top:24px;
    margin-bottom: 14px;
  }
  .bottom2{
    font-size: 16px;
    font-weight: 300;
    line-height: 29px;
    color: #999999;
    opacity: 1;
    margin-bottom: 24px;
  }
</style>